package org.lex.app.prefs;

import java.util.Properties;
import java.util.Set;

/**
 * @author Daniel Liu
 */
public class MemoryResourceMap extends AbstractResourceMap {
	private Properties props = new Properties();

	@Override
	public String getString(String key) {
		return props.getProperty(key);
	}

	@Override
	public void putString(String key, String value) {
		props.setProperty(key, value);
	}

	@Override
	public void clear() {
		props.clear();
	}

	@Override
	public boolean containsProperty(String key) {
		return props.containsKey(key);
	}

	@Override
	public Set<String> propertyNames() {
		return props.stringPropertyNames();
	}

	@Override
	public String toString() {
		return props.toString();
	}

	// not using
	@Override
	public void load() {
	}

	@Override
	public void store() {
	}
}
